#include <REGX52.H>

sbit StepMotor_A=P1^0;	//A项引脚
sbit StepMotor_B=P1^1;	//B项引脚
sbit StepMotor_C=P1^2;	//C项引脚
sbit StepMotor_D=P1^3;	//D项引脚

void StepMotor_SetOnlyA()
{
	StepMotor_A=1;//A导通	
	StepMotor_B=0;
	StepMotor_C=0;
	StepMotor_D=0;
}
void StepMotor_SetOnlyB()
{
	StepMotor_A=0;
	StepMotor_B=1;//B导通	
	StepMotor_C=0;
	StepMotor_D=0;
}

void StepMotor_SetOnlyC()
{
	StepMotor_A=0;
	StepMotor_B=0;
	StepMotor_C=1;//C导通	
	StepMotor_D=0;
}
void StepMotor_SetOnlyD()
{
	StepMotor_A=0;
	StepMotor_B=0;
	StepMotor_C=0;	
	StepMotor_D=1;//D导通
}